//
//  AXFPictureCell.m
//  Home
//
//  Created by HH on 16/11/22.
//  Copyright © 2016年 adad. All rights reserved.
//

#import "AXFPictureCell.h"
#import "AXFCommonModel.h"

@interface AXFPictureCell ()

@property (nonatomic,weak)UIImageView *pictureView;

@end

@implementation AXFPictureCell

- (void)setupUI
{
    UIImageView *pictureView = [[UIImageView alloc] init];
    self.pictureView = pictureView;
    
    pictureView.backgroundColor = [UIColor cz_randomColor];
    
    [self.contentView addSubview:pictureView];
    
    [pictureView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.offset(0);
    }];
}

- (void)setModel:(AXFCommonModel *)model
{
    _model = model;
    
    [self.pictureView sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"v2_placeholder_square"]];
}


@end
